package cz.acies.organizer.data.persist;

import java.io.Serializable;
import java.util.Hashtable;

public class ImAddress implements Serializable
{
	private static final long serialVersionUID = -1174912800831251787L;

	public static final int HOME = 0;
	public static final int WORK = 1;
	public static final int OTHER = 2;
	
	public static final int SKYPE = 17;
	public static final int ICQ = 12;
	//public static final int AIM = 10;
	//public static final int GOOGLE_TALK = 11;
	//public static final int JABBER = 13;
	//public static final int MSN = 14;
	//public static final int NETMEETING = 15;
	//public static final int QQ = 16;
	//public static final int YAHOO = 18;
	
	public static Hashtable<Integer, String> Rels = new Hashtable<Integer, String>();
	static {
		Rels.put(new Integer(HOME), "http://schemas.google.com/g/2005#home");
		Rels.put(new Integer(WORK), "http://schemas.google.com/g/2005#work");
		Rels.put(new Integer(OTHER), "http://schemas.google.com/g/2005#other");
	}

	public static Hashtable<Integer, String> Protocols = new Hashtable<Integer, String>();
	static {
		Protocols.put(new Integer(SKYPE), "http://schemas.google.com/g/2005#SKYPE");
		Protocols.put(new Integer(ICQ), "http://schemas.google.com/g/2005#ICQ");
		//Protocols.put(new Integer(AIM), "http://schemas.google.com/g/2005#AIM");
		//Protocols.put(new Integer(GOOGLE_TALK), "http://schemas.google.com/g/2005#GOOGLE_TALK");
		//Protocols.put(new Integer(JABBER), "http://schemas.google.com/g/2005#JABBER");
		//Protocols.put(new Integer(MSN), "http://schemas.google.com/g/2005#MSN");
		//Protocols.put(new Integer(NETMEETING), "http://schemas.google.com/g/2005#NETMEETING");
		//Protocols.put(new Integer(QQ), "http://schemas.google.com/g/2005#QQ");
		//Protocols.put(new Integer(YAHOO), "http://schemas.google.com/g/2005#YAHOO");
	}
	public static Hashtable<String, Integer> ProtocolsId = new Hashtable<String, Integer>();
	static {
		ProtocolsId.put("NTCONDAT03", new Integer(SKYPE));
		ProtocolsId.put("NTCONDAT06", new Integer(ICQ));
		//ProtocolsId.put("", new Integer(AIM));
		//ProtocolsId.put("", new Integer(GOOGLE_TALK));
		//ProtocolsId.put("", new Integer(JABBER));
		//ProtocolsId.put("", new Integer(MSN));
		//ProtocolsId.put("", new Integer(NETMEETING));
		//ProtocolsId.put("", new Integer(QQ));
		//ProtocolsId.put("", new Integer(YAHOO));
	}

	protected String address;
	protected int rel = HOME;
	protected boolean primary = false;

	public ImAddress(String address) {
		this(address, HOME, false);
	}

	public ImAddress(String address, int rel, boolean primary) {
		this.address = address;
		this.rel = rel;
		this.primary = primary;
	}

	// -----  -----------------------------------------------------------------
	
	public String getAddress() {
		return address;
	}
	
	public void setAddress(String address) {
		this.address = address;
	}

	public int getRel() {
		return rel;
	}

	public void setRel(int rel) {
		this.rel = rel;
	}

	public boolean isPrimary() {
		return primary;
	}

	public void setPrimary(boolean primary) {
		this.primary = primary;
	}
}
